home *** CD-ROM | disk | FTP | other *** search
/ ASME's Mechanical Engine…ing Toolkit 1997 December / ASME's Mechanical Engineering Toolkit 1997 December.iso / ai / prlg195b.lzh / EXPERT.LZH / HEMAT.PRO < prev    next >
Text File  |  1986-07-20  |  4KB  |  122 lines

  1. /*
  2. .PN1
  3. .PO0 */
  4.  
  5. signs :- nl, 
  6.   print( 'Does the patient exhibit any of the following signs:' ), nl,
  7.   print( 'weakness, lightheadedness, syncope, cardiac awareness,
  8.   pallor, tachycardia, jaundice.' ), 
  9.   affirm,
  10.   syndrome( 1 ).
  11.  
  12. syndrome( 1 ) :- 'undist anemia'.
  13.  
  14. 'undist anemia' :-
  15.    anemia( RBC ), 
  16.    print( 'Patient has anemia. We now try to diagnose the specific type.' ),
  17.   'anemia subtype'( RBC ).
  18.  
  19. 'anemia subtype'( RBC ) :-  'congenital hemolytic anemia'( RBC ).
  20. 'anemia subtype'( RBC ) :-  'acquired hemolytic anemia'.
  21.  
  22. 'acquired hemolytic anemia' :-  
  23.    ldh( high ),  nl,
  24.    print('Based upon a diagnosis of anemia and ' ),  
  25.    print(' high LDH we obtain acquired hemolytic anemia.' ).
  26.  
  27. 'congenital hemolytic anemia'( low )  :-
  28.    'congenital hemolytic history', 
  29.    'congenital hemolytic determinant', nl,
  30.    print('Based upon a diagnosis of anemia and '), 
  31.    print( 'the just named symptom we diagnose congenital hemolytic anemia.' ).
  32.  
  33. 'deficiency anemia' :- nl,
  34.   print( 'Diagnosis is a deficiency anemia.' ).
  35.  
  36.  
  37. 'congenital hemolytic history' :- jaundice.
  38. 'congenital hemolytic history' :- gallstones.
  39. 'congenital hemolytic history' :- sphenomegally.
  40. 'congenital hemolytic history' :- hepatomegally.
  41. 'congenital hemolytic history' :- 'bony malformations'.
  42. 'congenital hemolytic history' :- 'mental retardation'.
  43.  
  44. 'congenital hemolytic determinant' :- microcytosis.
  45. 'congenital hemolytic determinant' :- eliptocytosis.
  46. 'congenital hemolytic determinant' :- spherocytosis.
  47. 'congenital hemolytic determinant' :- anisopoikilocytosis.
  48. 'congenital hemolytic determinant' :- 'anemia related to food'.
  49.  
  50. microcytosis :- labfindings( microcytosis ).
  51. eliptocytosis :- labfindings( eliptocytosis ).
  52. anisopoikilocytosis :- labfindings( anisopoikilocytosis ).
  53. 'anemia related to food' :- evidence( 'anemia related to food' ).
  54. spherocytosis :- nl,
  55.      print( 'Is the % of spherocytosis > 50%' ), affirm.
  56.  
  57. anemia( RBC ) :- symptom( anemic ), rbc( RBC ).
  58.  
  59. symptom( anemic ) :- hemoglobin( low ).
  60. symptom( anemic ) :- hematocrit( low ).
  61.  
  62. evidence( X ) :- nl,
  63.   print('Has the patient evidence of '),
  64.   print( X ), affirm.
  65.  
  66. labfindings( X ) :- nl,
  67.   print('Are there laboratory findings of ' ),
  68.   print( X ), affirm.
  69.  
  70. jaundice :- evidence( jaundice ).
  71. gallstones :- evidence( gallstones ).
  72. sphenomegally :- evidence( sphenomegally ).
  73. hepatomegally :- evidence( hepatomegally ).
  74. 'bony malformations' :- evidence( 'bony malformations' ).
  75. 'mental retardation' :- evidence(  'mental retardation' ).
  76. 'retarded growth and development' :-
  77.      evidence( 'retarded growth and development' ).
  78. 'crisis of viscera, bones' :-
  79.      evidence( 'crisis of viscera, bones' ).
  80.  
  81.  
  82. /* Laboratory measurements: */
  83.  
  84. rbc( HLN ) :- rbcmeas( RBC ), rbccat( RBC, HLN ).
  85. rbccat( RBC, low ) :- RBC < 4.
  86. rbccat( RBC, high) :- RBC > 6.
  87. rbccat( RBC, norm ) :- RBC = 5.
  88. rbcmeas(RBC) :- nl,
  89.      print( 'Input the RBC in millions/microliter:' ),
  90.      read( RBC ).
  91.  
  92. hematocrit( HLN ) :- hematocrtmeas( HEMAT ), hematcat( HEMAT, HLN ).
  93. hematcat( HEMAT, low ) :- HEMAT < 36.
  94. hematocrtmeas( HEMAT ) :- nl,
  95.      print( 'What is the hematocrit level % per deciliter?:' ),
  96.      read( HEMAT ).
  97.  
  98. mcv( low  ) :- mcv1( low ).
  99. mcv( high ) :- mcv1( high ), not( arct( high ) ).
  100.  
  101.  
  102. mcv1( HLN ) :- mcvmeas( MCV ), mcvcat( MCV, HLN ).
  103. mcvcat( MCV, high) :- MCV > 96.
  104. mcvcat( MCV, low ) :- MCV < 85.
  105. mcvmeas( MCV ) :- nl,
  106.   print( 'What is the level of MCV in cubic microns:' ),
  107.   read( MCV ).
  108.  
  109. ldh( LDH ) :- nl,
  110.   print( 'What is the level of LDH (high,low, or norm)?: ' ),
  111.   read( LDH ).
  112.  
  113. arct( HLN ) :- arctmeas( ARCT ), arctcat( ARCT, HLN ).
  114. arctmeas( ARCT ) :- nl,
  115.   print( 'What is the absolute reticulocyte count in units of thousands:'),
  116.   nl,
  117.   read( ARCT ).
  118.  
  119. affirm :- nl, print( '(y./n.) ?:- ' ),  read( ANS ), nl, yes( ANS ).
  120.  
  121. yes( y ).
  122.